package com.xinthe.krisco.utils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @author Venkat
 *
 */
public class ValidationUtil {

	/**
	 * @return an Order to the caller of the method. The OrderNumber will be
	 *         created based on the TimeStamp of the System and concatenated
	 *         with the String XINTHE.
	 * 
	 */
	public static String generateOrderNo() {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
				"ddMMyyyyHHMMSS");
		Calendar calendar = Calendar.getInstance();
		Date dateOne = calendar.getTime();
		return "XINTHE" + simpleDateFormat.format(dateOne);
	}
	public static String generateOrderDate() {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat(
				"yyyyMMdd HH:MM:SS");
		Calendar calendar = Calendar.getInstance();
		Date dateOne = calendar.getTime();
		return  simpleDateFormat.format(dateOne);
	}
		/*public static void main(String[] args) {
			System.out.println(generateOrderNo()+"ssssssss"+generateOrderDate());
		}*/
}
